package com.dcsh.market;

// Generated 2009-3-2 20:48:10 by Hibernate Tools 3.2.2.GA

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Rkxx generated by hbm2java
 */
@Entity
@Table(name = "Rkxx", schema = "dbo", catalog = "test")
public class Rkxx implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4519186317680853211L;
	
	private int id;
	private Canku canku;
	private Users rkczy;
	private Users rkfzr;
	private String bno;
	private Date rksj;
	private Set<Rkmx> rkmxes = new HashSet<Rkmx>(0);

	public Rkxx() {
	}

	public Rkxx(Canku canku, Users rkczy, Users rkfzr, String bno, Date rksj) {
		this.canku = canku;
		this.rkczy = rkczy;
		this.rkfzr = rkfzr;
		this.bno = bno;
		this.rksj = rksj;
	}

	public Rkxx(int id, Canku canku, Users rkczy, Users rkfzr, String bno, Date rksj) {
		this.id = id;
		this.canku = canku;
		this.rkczy = rkczy;
		this.rkfzr = rkfzr;
		this.bno = bno;
		this.rksj = rksj;
	}

	public Rkxx(int id, Canku canku, Users rkczy, Users rkfzr, String bno, Date rksj,
			Set<Rkmx> rkmxes) {
		this.id = id;
		this.canku = canku;
		this.rkczy = rkczy;
		this.rkfzr = rkfzr;
		this.bno = bno;
		this.rksj = rksj;
		this.rkmxes = rkmxes;
	}
	
	public Rkxx(Canku canku, Users rkczy, Users rkfzr, String bno, Date rksj,
			Set<Rkmx> rkmxes) {
		this.canku = canku;
		this.rkczy = rkczy;
		this.rkfzr = rkfzr;
		this.bno = bno;
		this.rksj = rksj;
		this.rkmxes = rkmxes;
	}

	@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "CankuID", nullable = false)
	public Canku getCanku() {
		return this.canku;
	}

	public void setCanku(Canku canku) {
		this.canku = canku;
	}

	@ManyToOne
	@JoinColumn(name = "Rkczy", nullable = false)
	public Users getRkczy() {
		return this.rkczy;
	}

	public void setRkczy(Users rkczy) {
		this.rkczy = rkczy;
	}

	@ManyToOne
	@JoinColumn(name = "Rkfzr")
	public Users getRkfzr() {
		return this.rkfzr;
	}

	public void setRkfzr(Users rkfzr) {
		this.rkfzr = rkfzr;
	}

	
	@Column(name = "BNO", nullable = false, length = 10)
	public String getBno() {
		return this.bno;
	}

	public void setBno(String bno) {
		this.bno = bno;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "Rksj", nullable = false, length = 23)
	public Date getRksj() {
		return this.rksj;
	}

	public void setRksj(Date rksj) {
		this.rksj = rksj;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "rkxx")
	public Set<Rkmx> getRkmxes() {
		return this.rkmxes;
	}

	public void setRkmxes(Set<Rkmx> rkmxes) {
		this.rkmxes = rkmxes;
	}

}
